import { userInfo } from "os";

/*
 * @Author: 1453937336@qq.com 1453937336@qq.com
 * @Date: 2024-05-06 09:50:08
 * @LastEditors: 1453937336@qq.com 1453937336@qq.com
 * @LastEditTime: 2024-05-15 11:06:49
 * @FilePath: \itforce-hris\src\store\getters.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const getters = {
  getCrumbList: (state: any) => state.crumbList,
  getUserInfo: (state: any) =>
    state?.loginStore?.userInfo ??
    JSON.parse(sessionStorage.getItem("userInfo")),
  getMenu: (state: any) => state.sidebarMenu,
  getCurrentPath: (state: any) => state.currentPath,
  permissions: (state: any) => state.permissionList,
  getRoles: (state: any) => state.loginStore.roles,
  getCurrentMenu: (state: any) => state.currentMenu,//获取当前路由名称
  getAsynRouters: (state: any) => state.asyncRouter,//获取后端动态路由
  getIsSidebarNavCollapse: (state: any) => state.isSidebarNavCollapse,
  getCommonBoxStatus: (state: any) => state.commonBoxs.commonBoxState,
  getMenuState: (state: any) => state.menuSetting.menuState,
  getUserData: (state: any) => state.menuSetting.userData,
  getShowEmpState: (state: any) => state.menuSetting.showEmp,
  getUserMenuName: (state: any) => state.menuSetting.userMenuName,//获取员工详情菜单
  getPositionState: (state: any) => state.positionStore.positionState,
  getEmployState: (state: any) => state.positionStore.employState,
  getTokenState: (state: any) => state.loginStore.token,
  getOrganizationTree: (state: any) => state.organizationStore.setTree,

};
export default getters;
